<template>
	<view>
		<!-- 头部 -->
		<view class="header">
			<view class="left" @click="show=true">
				<view class="">
					{{selector[selectindex]}}
				</view>
				<view class="image">
					<image src="../../static/xiajiantou.png" mode=""></image>
				</view>
			</view>
			<view class="right" @click="addtechnician">
				新增技师
			</view>
		</view>
		<!-- 选择 -->
		<u-picker v-model="show" :default-selector="selectindex" mode="selector" :range="selector" @confirm="selectclass"></u-picker>

		<!-- 技师列表 -->
		<view class="technilist" v-for="(item,index) in 5" :key="index" @click="techniciandetails">
			<view class="left">
				<image src="../../static/black.jpg" mode=""></image>
			</view>
			<view class="right">
				<view class="top">
					<view class="name">
						门福通
					</view>
					<view class="">
						高级技师
					</view>
				</view>
				<view class="centA">
					<view class="">
						三级甲等
					</view>
					<view class="">
						从业18年
					</view>
					<view class="">
						预约33354次
					</view>
				</view>
				<view class="centB">
					擅长：推拿、脊椎恢复
				</view>

			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				selector: ['盲人技师', '非盲人技师'],
				selectindex: 0,
			}
		},
		methods: {
			//技师详情
			techniciandetails(){
				uni.navigateTo({
					url:"../techniciandetails/techniciandetails"
				})
			},
			
			//新增技师
			addtechnician(){
				uni.navigateTo({
					url:"../addtechnician/addtechnician"
				})
			},
			
			//分类选择
			selectclass(e) {
				this.selectindex = e[0]
				console.log('分类选择', e[0])
			},
		}
	}
</script>

<style lang="scss">
	image {
		width: 100%;
		height: 100%;
	}

	.header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 20rpx;
		border-bottom: 1rpx solid #ECECEC;
		.left {
			display: flex;
			align-items: center;

			.image {
				width: 30rpx;
				height: 30rpx;
				margin-left: 10rpx;
			}
		}

		.right {
			background-color: rgb(35, 149, 255);
			color: #FFFFFF;
			font-size: 28rpx;
			width: 140rpx;
			height: 60rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			border-radius: 10rpx;
		}
	}

	.technilist {
		display: flex;
		border-bottom: 1rpx solid #ECECEC;
		padding: 20rpx;

		.left {
			width: 130rpx;
			height: 130rpx;
			margin-right: 20rpx;

			image {
				border-radius: 50%;
			}
		}

		.right {
			display: flex;
			flex-direction: column;
			justify-content: space-between;

			.top {
				display: flex;
				align-items: center;
				font-size: 26rpx;
				color: #000000;

				.name {
					font-size: 32rpx;
					font-weight: 550;
					margin-right: 20rpx;
				}
			}

			.centA {
				display: flex;
				align-items: center;

				view {
					width: 140rpx;
					height: 40rpx;
					text-align: center;
					line-height: 40rpx;
					background-color: #f49c1c;
					color: #FFFFFF;
					border-radius: 50rpx;
					font-size: 22rpx;
					margin-right:10rpx;
				}

			}

			.centB {
				color: #C8C9CC;
				font-size: 24rpx;
			}
		}

	}
</style>
